LevelBar: Really fix underallocation of blocks
authorDaniel Boles <dboles@src.gnome.org>
Sat, 12 Aug 2017 14:51:45 +0000 (15:51 +0100)
committerDaniel Boles <dboles@src.gnome.org>
Mon, 28 Aug 2017 23:03:47 +0000 (00:03 +0100)
commitc85f34b6fcfdd671a9af714064f5b92f2ae4a5d6
tree59ceafa660738e407c1801d46bcb6fa6599b7a74
parentbd7c87c762c75bbb8dfb5fed23964651188ef206
LevelBar: Really fix underallocation of blocks

Themes should not enforce min sizes on blocks in continuous mode; in
this case, the filled block should be as large as it needs to be to
reflect the current value, and no larger or smaller than that. So, the
fact that the minimal size was selected on just levelbar block is wrong:
we should also require the levelbar.discrete class to apply min sizes.

The widget should enforce whatever correct minimum size results from the
above fix, by reapplying commit 78b4885fe8850e132d8bb06df8ab90ac6c2033e0

Except: we should not allocate/draw the filled block if the value is 0,
as in this case, the LevelBar should be empty, not have a min-size fill.

https://bugzilla.gnome.org/show_bug.cgi?id=783649
gtk/gtklevelbar.c
gtk/theme/Adwaita/_common.scss
gtk/theme/Adwaita/gtk-contained-dark.css
gtk/theme/Adwaita/gtk-contained.css
gtk/theme/HighContrast/_common.scss
gtk/theme/HighContrast/gtk-contained-inverse.css
gtk/theme/HighContrast/gtk-contained.css